﻿namespace WorldView
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Drawing;

    public class Block
    {
        public byte Tilebyte;
        public bool liquid = false;
        public bool wall = false;
        public byte wallbyte;
        public bool light = false;
        public bool lava = false;
        public byte level = 0;
        public bool active = true;
        public bool framelock = false;
        public bool sky = false;

        public short frameX = -1;
        public short frameY = -1;
        /*public Block(TileType type, bool isLiquid = false, bool isWall = false, bool isLighted = false, byte liquidLevel = 0, bool isLava=false)
        {
            this.TileType = type;
            this.liquid = isLiquid;
            this.wall = isWall;
            this.light = isLighted;
            this.level = liquidLevel;
            this.lava = isLava;
        }*/

        public Block()
        {

        }

        public byte Tbyte
        {
            get
            {
                return this.Tilebyte;
            }
        }

        public bool isLiquid
        {
            get
            {
                return this.liquid;
            }
        }

        public bool isLava
        {
            get
            {
                return this.lava;
            }
        }

        public bool isWall
        {
            get
            {
                return this.wall;
            }
        }

        public bool isLighted
        {
            get
            {
                return this.light;
            }
        }

        public byte LiquidLevel
        {
            get
            {
                return this.level;
            }
        }
        public void changeFrame(short x, short y)
        {
            if (framelock == false)
            {
                frameX = x;
                frameY = y;
                framelock = true;
            }
        }
    }
}
